Test Series - java script

Test Number 34/92

Q: The type that specifies what kind of event occurred is ____________
A. event type
B. even target
C. both event type and even target
D. interface
Solution: The event type is a string that specifies what kind of event occurred. The type “mousemove”, for example, means that the user moved the mouse.
Q: Which is the object on which the event occurred or with which the event is associated?
A. event type
B. event target
C. both event type and even target
D. interface
Solution: The event target is the object on which the event occurred or with which the event is associated. When we speak of an event, we must specify both the type and the target. The target property of the Event interface is a reference to the object that dispatched the event.
Q: In general, event handler is nothing but ____________
A. function
B. interface
C. event
D. handler
Solution: An event handler is in general, a function that handles or responds to an event. For example onclick, onkeypress, onload etc are event handler functions.
Q: When will the browser invoke the handler?
A. Program begins
B. Any event occurs
C. Specified event occurs
D. Webpage loads
Solution: When an event of the specified type occurs on the specified target, the browser invokes the handler. For example onclick function is executed when mouse is clicked.
Q: Which property specifies the property of the event?
A. Type
B. Target
C. Manner
D. Program
Solution: All event objects have a type property that specifies the event type. Event type is a string that specifies what kind of event occurred.
Q: The process by which the browser decides which objects to trigger event handlers on is ____________
A. Event Triggering
B. Event Listening
C. Event Handling
D. Event propagation
Solution: Event propagation is the process by which the browser decides which objects to trigger event handlers. Event propagation is a way to describe the “stack” of events that are fired in a web browser.
Q: Which form of event propagation handles the registered container elements?
A. Event Propagation
B. Event Registration
C. Event Capturing
D. Default Actions
Solution: Event bubbling and capturing are two ways of event propagation in the HTML DOM API. With bubbling, the event is first captured and handled by the innermost element and then propagated to outer elements. With capturing, the event is first captured by the outermost element and propagated to the inner elements.
Q: The events that are directly tied to a specific input device are ____________
A. Device-independent input events
B. Device-dependent input events
C. User interface events
D. State change events
Solution: These are events that are directly tied to a specific input device, such as the mouse or keyboard) They include legacy event types such as “mousedown”, “mousemove”, “mouseup”, “keydown”, “keypress”, and “keyup” and also new touch specific events like “touchmove” and “gesturechange”.
Q: The high-level events among the following events are ____________
A. User interface events
B. Device-independent events
C. Device-dependent events
D. Stage event change
Solution: UI events are higher-level events, often on HTML form elements that define a user interface for a web application. They include the focus event (when a text input field gains keyboard focus), the change event when the user changes the value displayed by a form element, and the submit event when the user clicks a Submit button in a form.
Q: The events that are not directly tied to a specific input device are _____________
A. User interface events
B. Device-independent events
C. Device-dependent events
D. Stage event change
Solution: These are input events that are not directly tied to a specific input device. The click event, for example, indicates that a link or button (or other document element) has been activated) This is often done via a mouse click, but it could also be done by keyboard or (on touch-sensitive devices) by gesture.

You Have Score    /10